Carbon


GetIconRefFromFolder

Header: Icons.h Carbon status: Supported

Provides an IconRef for a folder with no custom icon.

OSErr GetIconRefFromFolder (
    SInt16 vRefNum, 
    SInt32 parentFolderID, 
    SInt32 folderID, 
    SInt8 attributes, 
    SInt8 accessPrivileges, 
    IconRef *theIconRef
);
vRefNum

The volume where the folder is located.

parentFolderID

The ID of the desired folder’s parent folder.

folderID

The ID of the desired folder.

attributes

The attributes of the desired folder. You can obtain this data from the CInfoPBRec.dirInfo.ioFlAttrib field of the folder’s catalog information record.

accessPrivileges

The access privileges of the specified folder. You can obtain this data from the CInfoPBRec.dirInfo.ioACUser field of the folder’s catalog information record.

theIconRef

On return, a pointer to the desired icon data.

function result

A result code.

DISCUSSION

If you do not have the catalog information for a folder, use the function GetIconRefFromFile.

Calling the GetIconRefFromFolder function increments the reference count of the IconRef.

Remember to call the function ReleaseIconRef when you're done with an IconRef.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when IconServicesLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by IconServicesLib 8.5 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/18/2000)